package com.exchange.View;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.view.View.OnClickListener;
import com.exchange.Controller.ExchangeDataService;
import com.exchange.Controller.a;
import com.exchange.Controller.f;
import com.exchange.Public.DownloadAgent;
import com.exchange.Public.ExchangeConstants;
import com.exchange.Public.h;
import com.exchange.Public.m;
import com.exchange.Public.n;
import com.exchange.b.a;

class k
  implements View.OnClickListener
{
  public void onClick(View paramView)
  {
    if (j.b(this.a) != null)
      j.b(this.a).onClick(paramView);
    a locala = j.c(this.a);
    n.a(ExchangeConstants.LOG_TAG, "package name:" + locala.s);
    if (h.a(locala.s, this.a.a))
    {
      new a(5, this.a.a, locala, this.a.d, 0, 0, 0).start();
      if (!(m.b(locala.i)))
        m.c(this.a.a, locala.i);
    }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              return;
              m.b(this.a.a, locala.s);
            }
            if (locala.r != 1)
              break;
            new a(3, this.a.a, locala, this.a.d, 1, 0, j.d(this.a).displayStyle).start();
            new DownloadAgent(this.a.a, locala, this.a.d, 0);
          }
          if ((locala.r != 2) && (locala.r != 4))
            break;
          new a(2, this.a.a, locala, this.a.d, 1, 0, j.d(this.a).displayStyle).start();
          new LandingWebViewDialog(this.a.a, locala.h).show();
        }
        if (locala.r != 3)
          break;
        new a(2, this.a.a, locala, this.a.d, 1, 0, j.d(this.a).displayStyle).start();
        Intent localIntent = new Intent("android.intent.action.VIEW", Uri.parse(locala.h));
        this.a.a.startActivity(localIntent);
      }
      new a(2, this.a.a, this.b, this.a.d, 1, 0, j.d(this.a).displayStyle).start();
      new PearlCurtainDialog(this.a.a, j.e(this.a).a() - 1, j.a(this.a)).show();
    }
  }
}